package com.xly.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xly.dao.UserInfoDao;
import com.xly.entity.UserInfo;
import com.xly.service.UserInfoService;


@Service
public class UserInfoServiceImpl extends ServiceImpl<UserInfoDao, UserInfo> implements UserInfoService{

	
	//查询
	public List<UserInfo> queryList(){
		return this.baseMapper.queryList();
	}
	
	//用户登录
	public UserInfo selectUser(String phone,String code){
		return this.baseMapper.selectUser(phone, code);
	}
	
	//根据用户名字查询用户信息
	public UserInfo selectByUsername(String username) {
		return this.baseMapper.selectByUsername(username);
	}
	
	//根据用户名查询角色组
	public List<String> selectRolesByName(String username){
		return this.baseMapper.selectRolesByName(username);
	}
}
